package com.imooc.demo.service.impl;

import com.imooc.demo.dao.SendDao;
import com.imooc.demo.entity.Send;
import com.imooc.demo.service.SendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SendServiceImpl implements SendService {
    @Autowired
    SendDao sendDao;
    @Override
    public List<Send> allSends(String buyerOpenid) {
        return sendDao.allSends(buyerOpenid);
    }

    @Override
    public boolean setReadStatus(Send send) {
        return sendDao.setReadStatus(send);
    }

    @Override
    public boolean deleteSend(Send send) {
        return sendDao.deleteSend(send);
    }

    @Override
    public boolean insertSend(Send send) {
        return sendDao.insertSend(send);
    }

    @Override
    public List<Send> sendById(Integer sendId) {
        return sendDao.sendById(sendId);
    }

    @Override
    public Send onlySendById(Integer sendId) {
        return sendDao.onlySendById(sendId);
    }

    @Override
    public List<Send> findUnread(String buyerOpenid) {
        return sendDao.findUnread(buyerOpenid);
    }
}
